package com.sdy.supermarket.biz.mapper;

import com.sdy.supermarket.biz.model.GsUserRes;
import com.sdy.mvc.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zzq
 * @since 2019-07-24
 */
public interface GsUserResMapper extends BaseMapper<GsUserRes> {

    /**
     * 批量插入
     *
     * @param list
     * @return
     */
    int batchInsert(List<GsUserRes> list);

    /**
     * 获取近七天的数据
     *
     * @return
     */
    @Select("select * from gs_user_res where create_time between current_date()-8 and SYSDATE()- INTERVAL 1 DAY;")
    List<GsUserRes> get7DaysList();
}
